import 'package:flutter/material.dart';
// import 'package:new_gradient_app_bar/new_gradient_app_bar.dart';
// import 'package:new_gradient_app_bar/new_gradient_app_bar.dart';
import '../util.dart';

PreferredSizeWidget fullAppbar(BuildContext context) {
  return PreferredSize(
    preferredSize: Size.fromHeight(210.0),
    child: Container(),
    // child: NewGradientAppBar(
    //   flexibleSpace: Row(
    //     mainAxisAlignment: MainAxisAlignment.spaceBetween,
    //     children: <Widget>[
    //       CustomPaint(
    //         painter: CircleOne(),
    //       ),
    //       CustomPaint(
    //         painter: CircleTwo(),
    //       ),
    //     ],
    //   ),
    //   title: Container(
    //     margin: EdgeInsets.only(top: 20),
    //     child: Column(
    //       mainAxisAlignment: MainAxisAlignment.center,
    //       crossAxisAlignment: CrossAxisAlignment.start,
    //       children: const <Widget>[
    //         Text(
    //           'Hello Brenda!',
    //           style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
    //         ),
    //         Text(
    //           'Today you have 9 tasks',
    //           style: TextStyle(fontSize: 10, fontWeight: FontWeight.w300),
    //         ),
    //       ],
    //     ),
    //   ),
    //   actions: <Widget>[
    //     Container(
    //       margin: EdgeInsets.fromLTRB(0, 20, 20, 0),
    //       child: Image.asset('assets/images/photo.png'),
    //     ),
    //   ],
    //   elevation: 0,
    //   gradient: const LinearGradient(
    //     begin: Alignment.topLeft,
    //     end: Alignment.bottomRight,
    //     colors: [CustomColors.HeaderBlueDark, CustomColors.HeaderBlueLight],
    //   ),
    //   bottom: PreferredSize(
    //     preferredSize: Size.fromHeight(10),
    //     child: Container(
    //       margin: EdgeInsets.symmetric(vertical: 15, horizontal: 20),
    //       padding: EdgeInsets.fromLTRB(15, 5, 15, 0),
    //       decoration: BoxDecoration(
    //         color: CustomColors.HeaderGreyLight,
    //         borderRadius: BorderRadius.circular(5.0),
    //       ),
    //       child: Row(
    //         mainAxisAlignment: MainAxisAlignment.spaceBetween,
    //         children: <Widget>[
    //           Column(
    //             mainAxisAlignment: MainAxisAlignment.spaceEvenly,
    //             crossAxisAlignment: CrossAxisAlignment.start,
    //             children: const <Widget>[
    //               Text(
    //                 'Today Reminder',
    //                 style: TextStyle(
    //                     color: Colors.white,
    //                     fontSize: 17,
    //                     fontWeight: FontWeight.w600),
    //               ),
    //               SizedBox(
    //                 height: 3,
    //               ),
    //               Text(
    //                 'Meeting with client',
    //                 style: TextStyle(
    //                     color: Colors.white,
    //                     fontSize: 10,
    //                     fontWeight: FontWeight.w300),
    //               ),
    //               SizedBox(
    //                 height: 3,
    //               ),
    //               Text(
    //                 '13.00 PM',
    //                 style: TextStyle(
    //                     color: Colors.white,
    //                     fontSize: 10,
    //                     fontWeight: FontWeight.w300),
    //               ),
    //             ],
    //           ),
    //           Container(
    //             width: MediaQuery.of(context).size.width / 2.9,
    //           ),
    //           Image.asset(
    //             'assets/images/bell-left.png',
    //             scale: 1.3,
    //           ),
    //           Container(
    //             margin: EdgeInsets.only(bottom: 80),
    //             child: Icon(
    //               Icons.clear,
    //               color: Colors.white,
    //               size: 18.0,
    //             ),
    //           ),
    //         ],
    //       ),
    //     ),
    //   ),
    // ),
  );
}

// PreferredSizeWidget emptyAppbar() {
//   return PreferredSize(
//     preferredSize: Size.fromHeight(75.0),
//     child: AppBar(
//
//     ),
//   );
// }

PreferredSizeWidget emptyAppbar() {
  return PreferredSize(
    preferredSize: Size.fromHeight(75.0),
    child: Container(),
    // child: NewGradientAppBar(
    //   flexibleSpace: Row(
    //     mainAxisAlignment: MainAxisAlignment.spaceBetween,
    //     children: <Widget>[
    //       CustomPaint(
    //         painter: CircleOne(),
    //       ),
    //       CustomPaint(
    //         painter: CircleTwo(),
    //       ),
    //     ],
    //   ),
    //   title: Container(
    //     margin: EdgeInsets.only(top: 20),
    //     child: Column(
    //       mainAxisAlignment: MainAxisAlignment.center,
    //       crossAxisAlignment: CrossAxisAlignment.start,
    //       children: const <Widget>[
    //         Text(
    //           'Hello Brenda!',
    //           style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
    //         ),
    //         Text(
    //           'Today you have no tasks',
    //           style: TextStyle(fontSize: 10, fontWeight: FontWeight.w300),
    //         ),
    //       ],
    //     ),
    //   ),
    //   actions: <Widget>[
    //     Container(
    //       margin: EdgeInsets.fromLTRB(0, 20, 20, 0),
    //       child: Image.asset('assets/images/photo.png'),
    //     ),
    //   ],
    //   elevation: 0,
    //   gradient: LinearGradient(
    //     begin: Alignment.topLeft,
    //     end: Alignment.bottomRight,
    //     colors: [CustomColors.HeaderBlueDark, CustomColors.HeaderBlueLight],
    //   ),
    // ),
  );
}

class CircleOne extends CustomPainter {
  late Paint _paint;

  CircleOne() {
    _paint = Paint()
      ..color = CustomColors.HeaderCircle
      ..strokeWidth = 10.0
      ..style = PaintingStyle.fill;
  }

  @override
  void paint(Canvas canvas, Size size) {
    canvas.drawCircle(Offset(28.0, 0.0), 99.0, _paint);
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    return false;
  }
}

class CircleTwo extends CustomPainter {
  late Paint _paint;

  CircleTwo() {
    _paint = Paint()
      ..color = CustomColors.HeaderCircle
      ..strokeWidth = 10.0
      ..style = PaintingStyle.fill;
  }

  @override
  void paint(Canvas canvas, Size size) {
    canvas.drawCircle(Offset(-30, 20), 50.0, _paint);
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    return false;
  }
}
